import request from '@/utils/request'

// 查询保险公司列表
export function listCompany(query) {
  return request({
    url: '/maintenance/company/list',
    method: 'get',
    params: query
  })
}

// 查询保险公司详细
export function getCompany(id) {
  return request({
    url: '/maintenance/company/' + id,
    method: 'get'
  })
}

// 新增保险公司
export function addCompany(data) {
  return request({
    url: '/maintenance/company',
    method: 'post',
    data: data
  })
}

// 修改保险公司
export function updateCompany(data) {
  return request({
    url: '/maintenance/company',
    method: 'put',
    data: data
  })
}
// 起停用
export function stopUsingEnabled(data) {
  return request({
    url: '/maintenance/company/stopUsingEnabled',
    method: 'put',
    data: data
  })
}

// 删除保险公司
export function delCompany(id) {
  return request({
    url: '/maintenance/company/' + id,
    method: 'delete'
  })
}

// 导出保险公司
export function exportCompany(query) {
  return request({
    url: '/maintenance/company/export',
    method: 'get',
    params: query
  })
}